Conventionally, a stereo camera apparatus capable of being mounted on an automobile is known, which captures an object by a stereo camera equipped with two cameras, and arithmetically manipulates the obtained image information to calculate the distance to the object (see JP 5(1993)-265547 A). The distance calculation in the stereo camera apparatus is performed as follows. Using triangulation, which is one of the three-dimensional measurement techniques, a pixel block having a correlation with a pixel block in an image obtained by one camera is searched for and specified in an image obtained by the other camera. Then, the distance to an object is calculated based on the parallax between both the pixel blocks, i.e., the relative displacement amount of the respective pixel blocks in two images (stereo images).
However, in this stereo camera apparatus, a mechanical attachment error of two cameras exists. For example, the postures of the cameras may be displaced in a horizontal direction, a vertical direction, or a rotation direction. In particular, the displacement in the horizontal direction causes an error in the parallax obtained based on two images, and consequently, the distance calculated based on the parallax differs from a correct distance. Therefore, in order to obtain distance information with high reliability, a high attachment precision of a camera and complicated image processing for correcting an attachment error are required.
For example, JP 2003-83742 A discloses the following method so as to correct the attachment error in the horizontal direction of the stereo camera. In an image obtained by one camera, a plurality of approximated straight lines spatially parallel to each other, which extend in a distance direction, are specified, and a first vanishing point is calculated from an intersection of the approximated straight lines. Similarly, in an image obtained by the other camera, a plurality of approximated straight lines spatially parallel to each other, which extend in the distance direction, are specified, and a second vanishing point is calculated from an intersection of the approximated straight lines. Then, an error in a measurement distance ascribed to the attachment error in the horizontal direction is corrected based on the displacement amount between the first vanishing point and the second vanishing point.
A method for calculating a vanishing point will be described with reference to FIG. 15. For example, the case will be considered where a camera captures a pair of white lines 901, 902 in a broken line shape drawn on a road, as shown in FIG. 15. In this case, two approximated straight lines 901a, 902a parallel to each other, which extend in a distance direction, are specified using one edge of each of the white lines 901, 902. Then, an intersection 903 of the two approximated straight lines 901a, 902a is obtained as a vanishing point.
On the other hand, in order to enhance the recognition rate at night, an image processing method has been proposed, in which the recognition rate at night is enhanced by combining a visible light camera with an infrared camera, and subjecting each imaging information to image processing.
For example, JP10(1998)-255019 A discloses the following method. A visible light image obtained by a visible light camera is binarized, and a high-brightness portion such as a taillight of an automobile is recognized. The temperature information on a portion corresponding to the high-brightness portion is obtained from an infrared image obtained by an infrared camera, and a threshold value for binarization of the infrared image is determined based on the temperature information. Then, the infrared image is binarized using the threshold value for binarization, and a vehicle is recognized based on the binarized infrared image.
As described above, in the case of calculating a distance by a stereo camera, two visible light cameras are required, and furthermore, it is required to enhance the attachment precision of two cameras, or to perform complicated arithmetic processing for correcting the attachment error of two cameras. This causes problems such as the enlargement of an apparatus, the degradation in a layout property, and the increase in cost. Furthermore, even in the case of enhancing the recognition rate at night, two cameras, i.e., a visible light camera and an infrared camera are required, which causes problems such as the enlargement of an apparatus, the degradation in a layout property, and the increase in cost.
Furthermore, JP 2004-12863 A discloses a camera apparatus equipped with a distance-measuring optical system and an imaging optical system independently. The camera apparatus includes a camera module in which two lenses constituting a distance-measuring optical system and one lens constituting a photometric optical system are placed integrally on the same plane. Furthermore, the camera apparatus includes an imaging lens constituting an imaging optical system apart from the lens module. The movement amount of the imaging lens is calculated using two lenses for measuring a distance, whereby autofocusing is realized. In this camera apparatus, an object image is captured only by an imaging lens. Thus, optical systems are required independently for measuring a distance and capturing an image, which increases the number of components and assembly man-hour to increase cost, and enlarges an apparatus.